package com.cn.mmd.service;

import com.cn.mmd.mapper.ShiroPermissionMapper;
import com.cn.mmd.model.ShiroPermission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/8/9 0009.
 */
@Service("shiroPermissionService")
public class ShiroPermissionServiceImpl implements ShiroPermissionService {

    @Autowired
    private ShiroPermissionMapper shiroPermissionMapper;

    @Override
    public List<ShiroPermission> selectByRoleId(Integer roleId) {
        return shiroPermissionMapper.selectByRoleId(roleId);
    }

    @Override
    public int insertSelective(ShiroPermission record) {
        return shiroPermissionMapper.insertSelective(record);
    }

    @Override
    public ShiroPermission selectByPrimaryKey(Integer id) {
        return shiroPermissionMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(ShiroPermission record) {
        return shiroPermissionMapper.updateByPrimaryKey(record);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return shiroPermissionMapper.deleteByPrimaryKey(id);
    }
}
